import { observer } from 'mobx-react';
import { makeAutoObservable } from "mobx"
import { Tree } from 'antd';

const { DirectoryTree } = Tree;

const treeData = [
    {
        title: '门诊病例',
        key: '0-0',
        children: [
            { title: 'MZBL202107081300', key: '0-0-0', isLeaf: true },
            { title: 'MZBL202107081301(停用)', key: '0-0-1', isLeaf: true },
        ],
    },
    {
        title: '中医治疗记录',
        key: '0-1',
        children: [
            { title: 'ZYZLJLMZBL202107081300', key: '0-1-0', isLeaf: true },
            { title: 'ZYZLJLMZBL202107081301', key: '0-1-0', isLeaf: true },
            { title: 'ZYZLJLMZBL202107081302', key: '0-1-0', isLeaf: true },
            { title: 'ZYZLJLMZBL202107081303', key: '0-1-0', isLeaf: true },
            { title: 'ZYZLJLMZBL202107081304(发布)', key: '0-1-0', isLeaf: true },
            { title: 'ZYZLJLMZBL202107081305', key: '0-1-0', isLeaf: true },
            { title: 'ZYZLJLMZBL202107081306', key: '0-1-0', isLeaf: true },
        ],
    },
    {
        title: '入院记录',
        key: '0-2',
        children: [
            { title: 'RYJL202107081300(停用)', key: '0-2-0', isLeaf: true },
            { title: 'RYJL202107081301(停用)', key: '0-2-1', isLeaf: true },
            { title: 'RYJL202107081302(停用)', key: '0-2-2', isLeaf: true },
            { title: 'RYJL202107081303(停用)', key: '0-2-3', isLeaf: true },
            { title: 'RYJL202107081304(停用)', key: '0-2-4', isLeaf: true },
            { title: 'RYJL202107081305(停用)', key: '0-2-5', isLeaf: true },
            { title: 'RYJL202107081306(停用)', key: '0-2-6', isLeaf: true },
            { title: 'RYJL202107081307(停用)', key: '0-2-7', isLeaf: true },
            { title: 'RYJL202107081308(发布)', key: '0-2-8', isLeaf: true },
            { title: 'RYJL202107081309(停用)', key: '0-2-9', isLeaf: true },
        ],
    },
];


import panbg from "@/res/panbg.png"

import style from "./index.less"

export default observer(
    function Index(props) {

        const onSelect = (keys, info) => {
            console.log('Trigger Select', keys, info);
        };

        const onExpand = () => {
            console.log('Trigger Expand');
        };

        return (
            <div style={{ ...props.style }}>
                <div style={{ display: 'flex', justifyContent: 'center', alignItems: "center", height: 44, backgroundColor: "#e3efff" }}>病例模板目录</div>
                <div style={{overflowY:'auto',whiteSpace:'pre-wrap'}}>
                    <DirectoryTree
                        multiple
                        defaultExpandAll
                        onSelect={onSelect}
                        onExpand={onExpand}
                        treeData
                        ={treeData}
                    />
                </div>

            </div>
        )
    }
)